package com.rychlickikicior.kitijdb;

/**
 *
 * @author kitikat
 */
public class Child {
    private Class type;
    private String propertyName;
    private Class propertyType;

    public Child() { }

    public Child(Class type, String propertyName, Class propertyType) {
        this.type = type;
        this.propertyName = propertyName;
        this.propertyType = propertyType;
    }

    public Class getType() {
        return type;
    }

    public void setType(Class type) {
        this.type = type;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    public Class getPropertyType() {
        return propertyType;
    }

    public void setPropertyType(Class propertyType) {
        this.propertyType = propertyType;
    }

    public int hashCode() {
        return this.getType().getName().length();
    }

    public boolean equals(Object o) {
        if (!(o instanceof Child))
            return false;
        Child child = (Child)o;
        return (child.getType().equals(this.getType()));
    }
}
